package javabase.schoolwork.day6_07;

/**
 * @author fance
 * @date 2018/6/7 20:13
 */
public class Sum {
    public static void main(String[] args) {
        new Thread(()->{
            for (int i = 0; i < 100; i++) {
                if (i % 2 == 0) {
                    System.out.println(Thread.currentThread().getName() + " " +i);
                }
            }
        }).start();
        new Thread(()->{
            for (int i = 0; i < 100; i++) {
                if (i % 2 != 0) {
                    System.out.println(Thread.currentThread().getName() + " " +i);
                }
            }
        }).start();
    }
}
